﻿using SD.Infrastructure.RepositoryBase;
using SlamDunk.MES.Domain.Entities.ResourceContext;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Collections.Generic;

namespace SlamDunk.MES.Domain.IRepositories.Interfaces.ResourceContext
{
    /// <summary>
    /// 物料类仓储接口
    /// </summary>
    public interface IMaterialClassRepository : IAggRootRepository<MaterialClass>
    {
        #region # 完整获取物料类 —— MaterialClass SingleFully(Guid classId)
        /// <summary>
        /// 完整获取物料类
        /// </summary>
        /// <param name="classId">物料类Id</param>
        /// <returns>物料类</returns>
        MaterialClass SingleFully(Guid classId);
        #endregion

        #region # 深度获取物料类列表 —— ICollection<MaterialClass> FindDeeply(string keywords...
        /// <summary>
        /// 深度获取物料类列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="materialSourceType">物料来源类型</param>
        /// <param name="parentNodeId">上级节点Id</param>
        /// <param name="facilityIds">工厂模型Id集</param>
        /// <returns>物料类列表</returns>
        ICollection<MaterialClass> FindDeeply(string keywords, MaterialSourceType? materialSourceType, Guid? parentNodeId, IList<Guid> facilityIds);
        #endregion

        #region # 获取根级物料类列表 —— ICollection<MaterialClass> FindRoots()
        /// <summary>
        /// 获取根级物料类列表
        /// </summary>
        /// <returns>物料类列表</returns>
        ICollection<MaterialClass> FindRoots();
        #endregion
    }
}
